﻿using System.Configuration;

namespace Telerik.Sitefinity.Social.Configuration
{
    /// <summary>
    ///     Inherits <see cref="ConfigurationSection"/> base class. Handles a section
    ///     within a configuration file.
    /// </summary>
    public class SectionHandler : ConfigurationSection
    {
        /// <summary>
        /// Gets or sets the name of the default provider that is used by Social module
        /// </summary>
        [ConfigurationProperty("defaultProvider"), StringValidator]
        public string DefaultProvider
        {
            get
            {
                return (string)base["defaultProvider"];
            }
            set
            {
                base["defaultProvider"] = value;
            }
        }

        /// <summary>
        /// Gets or sets the name of the membership provider.
        /// </summary>
        /// <value>The name of the membership provider.</value>
        public string MembershipProviderName
        {
            get
            {
                return (string) base["membershipProviderName"];
            }
            set
            {
                base["membershipProviderName"] = value;
            }
        }

        /// <summary>
        /// Read-only property. Gets a ProviderSettingsCollection object of ProviderSettings objects.
        /// </summary>
        [ConfigurationProperty("providers")]
        public ProviderSettingsCollection Providers
        {
            get
            {
                return (ProviderSettingsCollection)base["providers"];
            }
        }

    }
}
